cmake_minimum_required(VERSION 3.8)
project(dxl_test)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(dynamixel_sdk REQUIRED)

include_directories(
  include
)

add_executable(positon_mode src/positon_mode.cpp)
ament_target_dependencies(positon_mode rclcpp dynamixel_sdk)

add_executable(velocity_mode src/velocity_mode.cpp)
ament_target_dependencies(velocity_mode rclcpp dynamixel_sdk)

add_executable(single_position src/single_position.cpp)
ament_target_dependencies(single_position rclcpp dynamixel_sdk)

add_executable(single_position2 src/single_position2.cpp)
ament_target_dependencies(single_position2 rclcpp dynamixel_sdk)

add_executable(bulk_test src/bulk_test.cpp)
ament_target_dependencies(bulk_test rclcpp dynamixel_sdk)


install(TARGETS
  positon_mode velocity_mode single_position single_position2 bulk_test
  DESTINATION lib/${PROJECT_NAME}
)

ament_package()
